from fhirclient import client
from fhirclient.models.patient import Patient
settings = {
'app_id': client_id,
'api_base': 'https://api.medplum.com/fhir/R4',
'app_secret': client_secret,
'launch_token': res
}
smart = client.FHIRClient(settings=settings)
patientId = 'de7b320e-627a-4119-888a-127f704e87b0'
patient = Patient.read(patientId, smart.server)
I get:
FHIRUnauthorizedException:
Please see attached file for the full error trace.
What am I doing wrong?
Thanks.
PS: I did get the authentication token; res = get_auth_token(url,client_id,client_secret)